package edu.infomatik.tundra.data;

import edu.infomatik.tundra.logic.UStoryBean;
import edu.infomatik.tundra.logic.UStoryTypes;
import edu.infomatik.tundra.logic.WorkKinds;

import java.util.Calendar;
import java.util.Date;
public class MockUStoryBean implements IMockedBean<UStoryBean>{
	
	private UStoryBean mocked;
	
	@Override
	public UStoryBean getMocked() {
		return mocked;
	}
	@SuppressWarnings("unused")
	private MockUStoryBean(){}
	MockUStoryBean(String name, String description, UStoryTypes type, long priority, long poValue, long projectId,
				   long sprintId, String note, String demo, int idealSP, int estSP, Date dateCreated, Date scheduleDate, Date deadline,
				   boolean inProgress) {
		mocked = new UStoryBean();
		
		mocked.setType(type);
		mocked.setProjectId(projectId);
		mocked.setSprintId(sprintId);
		mocked.setPriority(priority);
		mocked.setPoValue(poValue);
//		mocked.setLinkedWith(linkedWith);
		mocked.setName(name);
		mocked.setKind(WorkKinds.USTORY);
		mocked.setDescription(description);
		mocked.setNote(note);
		mocked.setDemo(demo);
		mocked.setIdealSP(idealSP);
		mocked.setEstSP(estSP);
		mocked.setDateCreated(dateCreated);
		mocked.setScheduleDate(scheduleDate);
		mocked.setDeadline(deadline);
		mocked.setInProgress(inProgress);
	}
	@SuppressWarnings("deprecation")
	public static MockTundraData getMockedDataFactory(){
		MockTundraData result = new MockTundraData();
		result.update(new MockUStoryBean("Story", "Opis jedne price korisnika", UStoryTypes.OTHER, 10, 100, 5, 1, 
										  "nije za izvrsavanje", "neki test", 10, 20, new Date(110,Calendar.AUGUST,27), 
										  new Date(110,Calendar.SEPTEMBER,2),new Date(110, Calendar.OCTOBER, 25), true));
		result.update(new MockUStoryBean("Story2", "Opis druge price korisnika", UStoryTypes.OTHER, 10, 100, 5, 1, 
										  "nije za izvrsavanje", "neki drugi test", 10, 20, new Date(110,Calendar.AUGUST,27), 
										  new Date(110,Calendar.SEPTEMBER,5), new Date(112, Calendar.APRIL, 2), false));
		return result;
	}
	public short getType() {
		return mocked.getType();
	}
	public void setType(UStoryTypes type) {
		mocked.setType(type);
	}
	public long getPriority() {
		return mocked.getPriority();
	}
	public void setPriority(long priority) {
		mocked.setPriority(priority);
	}
	public long getPoValue() {
		return mocked.getPoValue();
	}
	public void setPoValue(long poValue) {
		mocked.setPoValue(poValue);
	}
	public long getLinkedWith() {
		return mocked.getLinkedWith();
	}
	public void setLinkedWith(long linkedWith) {
		mocked.setLinkedWith(linkedWith);
	}
	@Override
	public long getId() {
		return mocked.getId();
	}
	@Override
	public void setId(long id) {
		mocked.setId(id);
	}
}
